﻿@{
    ViewBag.Title = "新增角色";
}
<style>
    html {
        background-color: #fff;
    }

    .layui-card {
        box-shadow: none;
    }
</style>
<div class="layui-card">
    <div class="layui-card-body">
        <form class="layui-form" action="@Url.Action("RoleAdd","Sys",new { area = "Admin"})" lay-filter="roleadd-form">
            <div class="layui-form-item">
                <label class="layui-form-label">角色编号</label>
                <div class="layui-input-block">
                    <input type="text" name="ID" lay-verify="required" placeholder="角色编号( 必须为数字 )" autocomplete="on" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">角色名称</label>
                <div class="layui-input-block">
                    <input type="text" name="RoleName" lay-verify="required" placeholder="请输入角色名称" autocomplete="on" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">上级角色</label>
                <div class="layui-input-block">
                    <select name="ParentID" lay-filter="ParentID">
                        @foreach (var item in (IEnumerable<SelectListItem>)ViewBag.ParentRoleDLL)
                        {
                        <option value="@item.Value">@item.Text</option>
                        }
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">排序号</label>
                <div class="layui-input-block">
                    <input type="text" name="SortNo" value="1000" lay-verify="required" placeholder="排序号" autocomplete="on" class="layui-input">
                </div>
            </div>
            <div id="roleadd-submit" lay-submit lay-filter="roleadd-submit"></div>
        </form>
    </div>
</div>
<script>
    layui.use(['form'], function () {
        var $ = layui.$, form = layui.form;

        form.render(null, 'roleadd-form');
        
    });
</script>
